import request from '@/utils/request'

// 获取课程视频列表
export function getCourseVideoList(courseId, params) {
  return request({
    url: `/admin/course/video/list?courseId=${courseId}`,
    method: 'get',
    params
  })
}

// 添加课程视频
export function addCourseVideo(data) {
  return request({
    url: '/admin/course/video/save',
    method: 'post',
    data
  })
}

// 更新课程视频
export function updateCourseVideo(data) {
  return request({
    url: '/admin/course/video/update',
    method: 'post',
    data
  })
}

// 删除课程视频
export function deleteCourseVideo(id) {
  return request({
    url: `/admin/course/video/delete?id=${id}`,
    method: 'get'
  })
}